package com.zzyl.service.impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.zzyl.base.PageResponse;
import com.zzyl.mapper.NursingProjectMapper;
import com.zzyl.service.OrdersService;
import com.zzyl.vo.NursingProjectVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Description OrdersServiceImpl
 * @Author apeng
 * @Date 2024-10-21
 */
@Service
public class OrdersServiceImpl implements OrdersService {

    @Autowired
    private NursingProjectMapper nursingProjectMapper;

    @Override
    public PageResponse page(String name, Integer pageNum, Integer pageSize, Integer status) {
        //查询
        PageHelper.startPage(pageNum,pageSize);
        Page<NursingProjectVo> result = nursingProjectMapper.getBypage(name,pageNum,pageSize,status);
        PageResponse pageResponse = new PageResponse(result);
        pageResponse.setRecords(result.getResult());
        return pageResponse;
    }
}
